<h1>Sign Up</h1>

<%="<"%>%- if user %>
  <%="<"%>%- if <%= @name %>.errors %>
    <ul class="errors">
    <%="<"%>%- <%= @name %>.errors.each do |error| %>
      <li><%="<"%>%= error.to_s %></li>
    <%="<"%>%- end %>
    </ul>
  <%="<"%>%- end %>
<%="<"%>%- end %>

<form action="/registration" method="post">
  <%="<"%>%= csrf_tag %>
  <div class="form-group">
    <input class="form-control" type="email" name="email" placeholder="Email"/>
  </div>
  <div class="form-group">
    <input class="form-control" type="password" name="password" placeholder="Password"/>
  </div>
  <button class="btn btn-success btn-sm" type="submit">Register</button>
</form>
<hr/>
<%="<"%>%= link_to("Already have an account?", "/signin") -%>
